<?php
// +----------------------------------------------------------------------
// | ADM Software [ 我宁可 为做过的事而后悔，也不想 因为没尝试而后悔。 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2014 扬州安蝶梦电子商务有限公司 All rights reserved.
// +----------------------------------------------------------------------
// | Author: 曹梦龙 <138888611@qq.com> <http://www.andiemeng.com>
// +----------------------------------------------------------------------
namespace Admin\Controller;

use Org\Util;
/**
 * 这是一个已使用 Aeapi接口类库的使用
 *
 * @author Myron
 */
class AeapiController extends AdminController {
     /**
     * 案例首页
     * @author 曹梦龙 <138888611@qq.com>
     */
    public function index() {
        //$AeHttp= new Util\AEHttp();
        //$result=$AeHttp->find("gr_test","id=63");
        //dump($result);
        //$result=$AeHttp->first("gr_test","id=63");
        //$result=$AeHttp->get("gr_test","33");
        //$result=$AeHttp->remove("gr_test","34");
        //$result=$AeHttp->clear("gr_test","id=35");
        //$data['name']='曹梦龙';
        //$data['createAt']=NOW_TIME*1000;
        //$data['updateAt']=NOW_TIME*1000;
        //$result=$AeHttp->create("gr_test",$data);
        //$result=$AeHttp->update("gr_test","id=36",$data);
        
        // $AEObject = new Util\AEObject('api',"gr_test");
         //$AEObject->set("name","曹梦龙222222");
         //$result= $AEObject->save();
        //$AEObject->set("name","EF788"); 
        //$result= $AEObject->save();
        //dump($AEObject->getArray());
         //$AeQuery=new Util\AEQuery('api',"gr_test");
        //$AEObject= $AeQuery->get(82);
        //$name=$AEObject->get('name');
        //$AEObject->set('name',"myron");
        //$AEObject->save();
        // $AeObjlist=$AeQuery->count("id >80"); 
         //dump($AeObjlist);
        
        
    
        
         $AeQuery=new Util\AEQuery('activity',"tmp_zsm_tmp1");
         $AEObject= $AeQuery->get(1);
         $AEObject->set('name',"曹梦龙");
         $AEObject->save();
         dump($AEObject);
         $this->display();
    }
}
